import os
import shutil
k1=os.getcwd()
k2=os.listdir()
k3=os.listdir()
#if os.path.isfile(k1+"\\"+"mytxt")==False:
#    os.mkdir("mytxt")

for i in k2:
    print(i,end='\t')
    print(os.path.isfile(k1+"\\"+i))
    if os.path.isfile(k1+"\\"+i)==False:
        k3.remove(i)
print(k3)        
        
#******************************
for i in k3:
    try:
        os.mkdir("my"+i.split(".")[1])
    except FileExistsError:
        pass
for i in k3:
    
    try:
        shutil.move(k1+'\\'+i,k1+'\\'+'my'+i.split(".")[1])
    except shutil.Error:
        pass
